<template>
	<view style="overflow: hidden;vwh">
		<scroll-view scroll-y="true" >
			<view class="df-c mt30">
				<view class="df-yc content pa20 br-20 wh100 bs pb30">
					<view v-if='details.title' style="font-size: 50rpx;" class="w100 df-c fb shsc title mt30">· {{details.title}} ·</view>
					<view style="color: #bbbbbb;" class="w100 mt20 fs26 df-c">{{details.createtime}}</view>
					<view style="text-align: justify;color:#555555;" class="html fs28 mt20">
						<u-parse :html="details.text"></u-parse>
					</view>
				</view>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				details:{}
			};
		},
		onLoad(){
			this.getDetails(this.$Route.query.id)
		},
		created(){
			
		},
		methods:{
			getDetails(id){
				this.$api('details',{id:id}).then(res=>{
					console.log(res)
					this.details=res.data
				}).catch(err=>{
					if(err.data.code==404){
						this.$tools.toast("暂无详情数据")
						setTimeout(function() {
							uni.navigateBack()
						}, 1000);
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
.content{
	width: 690rpx;
	background-color: #FFFFFF;
}
</style>
